#pragma once
// MESSAGE AGX_TO_PX4_DEDICATE_INFO PACKING

#define MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO 205


typedef struct __mavlink_agx_to_px4_dedicate_info_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot)*/
 int32_t roll; /*< [degE4]  roll angle between the body coordinate system and the geographic coordinate system*/
 int32_t pitch; /*< [degE4]  pitch */
 uint32_t yaw; /*< [degE4]  yaw */
 int32_t lat_target; /*< [degE7] Latitude*/
 int32_t lon_target; /*< [degE7] Longitude*/
 int32_t height_target; /*< [E-2 m] Height.*/
 int32_t lat_plan; /*< [degE7] Latitude of planned waypoint*/
 int32_t lon_plan; /*< [degE7] Longitude of planned waypoint*/
 int32_t height_plan; /*< [E-2 m] Height of planned waypoint.*/
 uint32_t remain_time_total; /*< [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.*/
 uint32_t remain_time_next_waypoint; /*< [E-2 s] countdown time for this ammunition to next waypoint.*/
 int16_t mean_speed_next_waypoint; /*< [millimeter/s] average speed to arrive the next waypoint*/
 int16_t strike_target_x; /*< [px] location of target needs to strike, in image coordinate, upper-left point is the origin point */
 int16_t strike_target_y; /*< [px] location of target needs to strike, */
 int16_t PodVarX; /*<  data from seeker, in software in ring simulation, meaningless */
 int16_t PodVarY; /*<  data from seeker, in software in ring simulation, meaningless */
 int16_t PodVarZ; /*<  data from seeker, in software in ring simulation, meaningless */
 uint8_t target_system; /*<  System ID*/
 uint8_t target_component; /*<  Component ID*/
 uint8_t nav_status; /*<  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error*/
 uint8_t task_phase_flag; /*<  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike*/
 uint8_t strike_call_flag; /*<  0x00: not call;  others: id of nodes which were called to tail after target*/
 uint8_t response_call_flag; /*<  0x00: not response;  others: id of nodes which respond to tail after target*/
 uint8_t replan_flag; /*<  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan */
 uint8_t PodCtrlInfo; /*<  data from seeker, in software in ring simulation, meaningless */
 uint8_t PodZoomVel; /*<  data from seeker, in software in ring simulation, meaningless */
} mavlink_agx_to_px4_dedicate_info_t;

#define MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN 69
#define MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN 69
#define MAVLINK_MSG_ID_205_LEN 69
#define MAVLINK_MSG_ID_205_MIN_LEN 69

#define MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC 111
#define MAVLINK_MSG_ID_205_CRC 111



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_AGX_TO_PX4_DEDICATE_INFO { \
    205, \
    "AGX_TO_PX4_DEDICATE_INFO", \
    27, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_agx_to_px4_dedicate_info_t, time_boot_ms) }, \
         { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_agx_to_px4_dedicate_info_t, target_system) }, \
         { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 61, offsetof(mavlink_agx_to_px4_dedicate_info_t, target_component) }, \
         { "nav_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 62, offsetof(mavlink_agx_to_px4_dedicate_info_t, nav_status) }, \
         { "roll", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_agx_to_px4_dedicate_info_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_agx_to_px4_dedicate_info_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_agx_to_px4_dedicate_info_t, yaw) }, \
         { "lat_target", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_agx_to_px4_dedicate_info_t, lat_target) }, \
         { "lon_target", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_agx_to_px4_dedicate_info_t, lon_target) }, \
         { "height_target", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_agx_to_px4_dedicate_info_t, height_target) }, \
         { "task_phase_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 63, offsetof(mavlink_agx_to_px4_dedicate_info_t, task_phase_flag) }, \
         { "strike_call_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 64, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_call_flag) }, \
         { "response_call_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 65, offsetof(mavlink_agx_to_px4_dedicate_info_t, response_call_flag) }, \
         { "replan_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 66, offsetof(mavlink_agx_to_px4_dedicate_info_t, replan_flag) }, \
         { "lat_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_agx_to_px4_dedicate_info_t, lat_plan) }, \
         { "lon_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_agx_to_px4_dedicate_info_t, lon_plan) }, \
         { "height_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_agx_to_px4_dedicate_info_t, height_plan) }, \
         { "remain_time_total", NULL, MAVLINK_TYPE_UINT32_T, 0, 40, offsetof(mavlink_agx_to_px4_dedicate_info_t, remain_time_total) }, \
         { "remain_time_next_waypoint", NULL, MAVLINK_TYPE_UINT32_T, 0, 44, offsetof(mavlink_agx_to_px4_dedicate_info_t, remain_time_next_waypoint) }, \
         { "mean_speed_next_waypoint", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_agx_to_px4_dedicate_info_t, mean_speed_next_waypoint) }, \
         { "strike_target_x", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_target_x) }, \
         { "strike_target_y", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_target_y) }, \
         { "PodCtrlInfo", NULL, MAVLINK_TYPE_UINT8_T, 0, 67, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodCtrlInfo) }, \
         { "PodVarX", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarX) }, \
         { "PodVarY", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarY) }, \
         { "PodVarZ", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarZ) }, \
         { "PodZoomVel", NULL, MAVLINK_TYPE_UINT8_T, 0, 68, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodZoomVel) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_AGX_TO_PX4_DEDICATE_INFO { \
    "AGX_TO_PX4_DEDICATE_INFO", \
    27, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_agx_to_px4_dedicate_info_t, time_boot_ms) }, \
         { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_agx_to_px4_dedicate_info_t, target_system) }, \
         { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 61, offsetof(mavlink_agx_to_px4_dedicate_info_t, target_component) }, \
         { "nav_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 62, offsetof(mavlink_agx_to_px4_dedicate_info_t, nav_status) }, \
         { "roll", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_agx_to_px4_dedicate_info_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_agx_to_px4_dedicate_info_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_agx_to_px4_dedicate_info_t, yaw) }, \
         { "lat_target", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_agx_to_px4_dedicate_info_t, lat_target) }, \
         { "lon_target", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_agx_to_px4_dedicate_info_t, lon_target) }, \
         { "height_target", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_agx_to_px4_dedicate_info_t, height_target) }, \
         { "task_phase_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 63, offsetof(mavlink_agx_to_px4_dedicate_info_t, task_phase_flag) }, \
         { "strike_call_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 64, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_call_flag) }, \
         { "response_call_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 65, offsetof(mavlink_agx_to_px4_dedicate_info_t, response_call_flag) }, \
         { "replan_flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 66, offsetof(mavlink_agx_to_px4_dedicate_info_t, replan_flag) }, \
         { "lat_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_agx_to_px4_dedicate_info_t, lat_plan) }, \
         { "lon_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_agx_to_px4_dedicate_info_t, lon_plan) }, \
         { "height_plan", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_agx_to_px4_dedicate_info_t, height_plan) }, \
         { "remain_time_total", NULL, MAVLINK_TYPE_UINT32_T, 0, 40, offsetof(mavlink_agx_to_px4_dedicate_info_t, remain_time_total) }, \
         { "remain_time_next_waypoint", NULL, MAVLINK_TYPE_UINT32_T, 0, 44, offsetof(mavlink_agx_to_px4_dedicate_info_t, remain_time_next_waypoint) }, \
         { "mean_speed_next_waypoint", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_agx_to_px4_dedicate_info_t, mean_speed_next_waypoint) }, \
         { "strike_target_x", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_target_x) }, \
         { "strike_target_y", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_agx_to_px4_dedicate_info_t, strike_target_y) }, \
         { "PodCtrlInfo", NULL, MAVLINK_TYPE_UINT8_T, 0, 67, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodCtrlInfo) }, \
         { "PodVarX", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarX) }, \
         { "PodVarY", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarY) }, \
         { "PodVarZ", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodVarZ) }, \
         { "PodZoomVel", NULL, MAVLINK_TYPE_UINT8_T, 0, 68, offsetof(mavlink_agx_to_px4_dedicate_info_t, PodZoomVel) }, \
         } \
}
#endif

/**
 * @brief Pack a agx_to_px4_dedicate_info message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot)
 * @param target_system  System ID
 * @param target_component  Component ID
 * @param nav_status  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error
 * @param roll [degE4]  roll angle between the body coordinate system and the geographic coordinate system
 * @param pitch [degE4]  pitch 
 * @param yaw [degE4]  yaw 
 * @param lat_target [degE7] Latitude
 * @param lon_target [degE7] Longitude
 * @param height_target [E-2 m] Height.
 * @param task_phase_flag  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike
 * @param strike_call_flag  0x00: not call;  others: id of nodes which were called to tail after target
 * @param response_call_flag  0x00: not response;  others: id of nodes which respond to tail after target
 * @param replan_flag  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan 
 * @param lat_plan [degE7] Latitude of planned waypoint
 * @param lon_plan [degE7] Longitude of planned waypoint
 * @param height_plan [E-2 m] Height of planned waypoint.
 * @param remain_time_total [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.
 * @param remain_time_next_waypoint [E-2 s] countdown time for this ammunition to next waypoint.
 * @param mean_speed_next_waypoint [millimeter/s] average speed to arrive the next waypoint
 * @param strike_target_x [px] location of target needs to strike, in image coordinate, upper-left point is the origin point 
 * @param strike_target_y [px] location of target needs to strike, 
 * @param PodCtrlInfo  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarX  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarY  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarZ  data from seeker, in software in ring simulation, meaningless 
 * @param PodZoomVel  data from seeker, in software in ring simulation, meaningless 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t nav_status, int32_t roll, int32_t pitch, uint32_t yaw, int32_t lat_target, int32_t lon_target, int32_t height_target, uint8_t task_phase_flag, uint8_t strike_call_flag, uint8_t response_call_flag, uint8_t replan_flag, int32_t lat_plan, int32_t lon_plan, int32_t height_plan, uint32_t remain_time_total, uint32_t remain_time_next_waypoint, int16_t mean_speed_next_waypoint, int16_t strike_target_x, int16_t strike_target_y, uint8_t PodCtrlInfo, int16_t PodVarX, int16_t PodVarY, int16_t PodVarZ, uint8_t PodZoomVel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, roll);
    _mav_put_int32_t(buf, 8, pitch);
    _mav_put_uint32_t(buf, 12, yaw);
    _mav_put_int32_t(buf, 16, lat_target);
    _mav_put_int32_t(buf, 20, lon_target);
    _mav_put_int32_t(buf, 24, height_target);
    _mav_put_int32_t(buf, 28, lat_plan);
    _mav_put_int32_t(buf, 32, lon_plan);
    _mav_put_int32_t(buf, 36, height_plan);
    _mav_put_uint32_t(buf, 40, remain_time_total);
    _mav_put_uint32_t(buf, 44, remain_time_next_waypoint);
    _mav_put_int16_t(buf, 48, mean_speed_next_waypoint);
    _mav_put_int16_t(buf, 50, strike_target_x);
    _mav_put_int16_t(buf, 52, strike_target_y);
    _mav_put_int16_t(buf, 54, PodVarX);
    _mav_put_int16_t(buf, 56, PodVarY);
    _mav_put_int16_t(buf, 58, PodVarZ);
    _mav_put_uint8_t(buf, 60, target_system);
    _mav_put_uint8_t(buf, 61, target_component);
    _mav_put_uint8_t(buf, 62, nav_status);
    _mav_put_uint8_t(buf, 63, task_phase_flag);
    _mav_put_uint8_t(buf, 64, strike_call_flag);
    _mav_put_uint8_t(buf, 65, response_call_flag);
    _mav_put_uint8_t(buf, 66, replan_flag);
    _mav_put_uint8_t(buf, 67, PodCtrlInfo);
    _mav_put_uint8_t(buf, 68, PodZoomVel);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#else
    mavlink_agx_to_px4_dedicate_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.lat_target = lat_target;
    packet.lon_target = lon_target;
    packet.height_target = height_target;
    packet.lat_plan = lat_plan;
    packet.lon_plan = lon_plan;
    packet.height_plan = height_plan;
    packet.remain_time_total = remain_time_total;
    packet.remain_time_next_waypoint = remain_time_next_waypoint;
    packet.mean_speed_next_waypoint = mean_speed_next_waypoint;
    packet.strike_target_x = strike_target_x;
    packet.strike_target_y = strike_target_y;
    packet.PodVarX = PodVarX;
    packet.PodVarY = PodVarY;
    packet.PodVarZ = PodVarZ;
    packet.target_system = target_system;
    packet.target_component = target_component;
    packet.nav_status = nav_status;
    packet.task_phase_flag = task_phase_flag;
    packet.strike_call_flag = strike_call_flag;
    packet.response_call_flag = response_call_flag;
    packet.replan_flag = replan_flag;
    packet.PodCtrlInfo = PodCtrlInfo;
    packet.PodZoomVel = PodZoomVel;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
}

/**
 * @brief Pack a agx_to_px4_dedicate_info message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot)
 * @param target_system  System ID
 * @param target_component  Component ID
 * @param nav_status  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error
 * @param roll [degE4]  roll angle between the body coordinate system and the geographic coordinate system
 * @param pitch [degE4]  pitch 
 * @param yaw [degE4]  yaw 
 * @param lat_target [degE7] Latitude
 * @param lon_target [degE7] Longitude
 * @param height_target [E-2 m] Height.
 * @param task_phase_flag  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike
 * @param strike_call_flag  0x00: not call;  others: id of nodes which were called to tail after target
 * @param response_call_flag  0x00: not response;  others: id of nodes which respond to tail after target
 * @param replan_flag  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan 
 * @param lat_plan [degE7] Latitude of planned waypoint
 * @param lon_plan [degE7] Longitude of planned waypoint
 * @param height_plan [E-2 m] Height of planned waypoint.
 * @param remain_time_total [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.
 * @param remain_time_next_waypoint [E-2 s] countdown time for this ammunition to next waypoint.
 * @param mean_speed_next_waypoint [millimeter/s] average speed to arrive the next waypoint
 * @param strike_target_x [px] location of target needs to strike, in image coordinate, upper-left point is the origin point 
 * @param strike_target_y [px] location of target needs to strike, 
 * @param PodCtrlInfo  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarX  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarY  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarZ  data from seeker, in software in ring simulation, meaningless 
 * @param PodZoomVel  data from seeker, in software in ring simulation, meaningless 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
                               uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t nav_status, int32_t roll, int32_t pitch, uint32_t yaw, int32_t lat_target, int32_t lon_target, int32_t height_target, uint8_t task_phase_flag, uint8_t strike_call_flag, uint8_t response_call_flag, uint8_t replan_flag, int32_t lat_plan, int32_t lon_plan, int32_t height_plan, uint32_t remain_time_total, uint32_t remain_time_next_waypoint, int16_t mean_speed_next_waypoint, int16_t strike_target_x, int16_t strike_target_y, uint8_t PodCtrlInfo, int16_t PodVarX, int16_t PodVarY, int16_t PodVarZ, uint8_t PodZoomVel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, roll);
    _mav_put_int32_t(buf, 8, pitch);
    _mav_put_uint32_t(buf, 12, yaw);
    _mav_put_int32_t(buf, 16, lat_target);
    _mav_put_int32_t(buf, 20, lon_target);
    _mav_put_int32_t(buf, 24, height_target);
    _mav_put_int32_t(buf, 28, lat_plan);
    _mav_put_int32_t(buf, 32, lon_plan);
    _mav_put_int32_t(buf, 36, height_plan);
    _mav_put_uint32_t(buf, 40, remain_time_total);
    _mav_put_uint32_t(buf, 44, remain_time_next_waypoint);
    _mav_put_int16_t(buf, 48, mean_speed_next_waypoint);
    _mav_put_int16_t(buf, 50, strike_target_x);
    _mav_put_int16_t(buf, 52, strike_target_y);
    _mav_put_int16_t(buf, 54, PodVarX);
    _mav_put_int16_t(buf, 56, PodVarY);
    _mav_put_int16_t(buf, 58, PodVarZ);
    _mav_put_uint8_t(buf, 60, target_system);
    _mav_put_uint8_t(buf, 61, target_component);
    _mav_put_uint8_t(buf, 62, nav_status);
    _mav_put_uint8_t(buf, 63, task_phase_flag);
    _mav_put_uint8_t(buf, 64, strike_call_flag);
    _mav_put_uint8_t(buf, 65, response_call_flag);
    _mav_put_uint8_t(buf, 66, replan_flag);
    _mav_put_uint8_t(buf, 67, PodCtrlInfo);
    _mav_put_uint8_t(buf, 68, PodZoomVel);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#else
    mavlink_agx_to_px4_dedicate_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.lat_target = lat_target;
    packet.lon_target = lon_target;
    packet.height_target = height_target;
    packet.lat_plan = lat_plan;
    packet.lon_plan = lon_plan;
    packet.height_plan = height_plan;
    packet.remain_time_total = remain_time_total;
    packet.remain_time_next_waypoint = remain_time_next_waypoint;
    packet.mean_speed_next_waypoint = mean_speed_next_waypoint;
    packet.strike_target_x = strike_target_x;
    packet.strike_target_y = strike_target_y;
    packet.PodVarX = PodVarX;
    packet.PodVarY = PodVarY;
    packet.PodVarZ = PodVarZ;
    packet.target_system = target_system;
    packet.target_component = target_component;
    packet.nav_status = nav_status;
    packet.task_phase_flag = task_phase_flag;
    packet.strike_call_flag = strike_call_flag;
    packet.response_call_flag = response_call_flag;
    packet.replan_flag = replan_flag;
    packet.PodCtrlInfo = PodCtrlInfo;
    packet.PodZoomVel = PodZoomVel;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO;
#if MAVLINK_CRC_EXTRA
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#else
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#endif
}

/**
 * @brief Pack a agx_to_px4_dedicate_info message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (time since system boot)
 * @param target_system  System ID
 * @param target_component  Component ID
 * @param nav_status  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error
 * @param roll [degE4]  roll angle between the body coordinate system and the geographic coordinate system
 * @param pitch [degE4]  pitch 
 * @param yaw [degE4]  yaw 
 * @param lat_target [degE7] Latitude
 * @param lon_target [degE7] Longitude
 * @param height_target [E-2 m] Height.
 * @param task_phase_flag  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike
 * @param strike_call_flag  0x00: not call;  others: id of nodes which were called to tail after target
 * @param response_call_flag  0x00: not response;  others: id of nodes which respond to tail after target
 * @param replan_flag  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan 
 * @param lat_plan [degE7] Latitude of planned waypoint
 * @param lon_plan [degE7] Longitude of planned waypoint
 * @param height_plan [E-2 m] Height of planned waypoint.
 * @param remain_time_total [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.
 * @param remain_time_next_waypoint [E-2 s] countdown time for this ammunition to next waypoint.
 * @param mean_speed_next_waypoint [millimeter/s] average speed to arrive the next waypoint
 * @param strike_target_x [px] location of target needs to strike, in image coordinate, upper-left point is the origin point 
 * @param strike_target_y [px] location of target needs to strike, 
 * @param PodCtrlInfo  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarX  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarY  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarZ  data from seeker, in software in ring simulation, meaningless 
 * @param PodZoomVel  data from seeker, in software in ring simulation, meaningless 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t nav_status,int32_t roll,int32_t pitch,uint32_t yaw,int32_t lat_target,int32_t lon_target,int32_t height_target,uint8_t task_phase_flag,uint8_t strike_call_flag,uint8_t response_call_flag,uint8_t replan_flag,int32_t lat_plan,int32_t lon_plan,int32_t height_plan,uint32_t remain_time_total,uint32_t remain_time_next_waypoint,int16_t mean_speed_next_waypoint,int16_t strike_target_x,int16_t strike_target_y,uint8_t PodCtrlInfo,int16_t PodVarX,int16_t PodVarY,int16_t PodVarZ,uint8_t PodZoomVel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, roll);
    _mav_put_int32_t(buf, 8, pitch);
    _mav_put_uint32_t(buf, 12, yaw);
    _mav_put_int32_t(buf, 16, lat_target);
    _mav_put_int32_t(buf, 20, lon_target);
    _mav_put_int32_t(buf, 24, height_target);
    _mav_put_int32_t(buf, 28, lat_plan);
    _mav_put_int32_t(buf, 32, lon_plan);
    _mav_put_int32_t(buf, 36, height_plan);
    _mav_put_uint32_t(buf, 40, remain_time_total);
    _mav_put_uint32_t(buf, 44, remain_time_next_waypoint);
    _mav_put_int16_t(buf, 48, mean_speed_next_waypoint);
    _mav_put_int16_t(buf, 50, strike_target_x);
    _mav_put_int16_t(buf, 52, strike_target_y);
    _mav_put_int16_t(buf, 54, PodVarX);
    _mav_put_int16_t(buf, 56, PodVarY);
    _mav_put_int16_t(buf, 58, PodVarZ);
    _mav_put_uint8_t(buf, 60, target_system);
    _mav_put_uint8_t(buf, 61, target_component);
    _mav_put_uint8_t(buf, 62, nav_status);
    _mav_put_uint8_t(buf, 63, task_phase_flag);
    _mav_put_uint8_t(buf, 64, strike_call_flag);
    _mav_put_uint8_t(buf, 65, response_call_flag);
    _mav_put_uint8_t(buf, 66, replan_flag);
    _mav_put_uint8_t(buf, 67, PodCtrlInfo);
    _mav_put_uint8_t(buf, 68, PodZoomVel);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#else
    mavlink_agx_to_px4_dedicate_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.lat_target = lat_target;
    packet.lon_target = lon_target;
    packet.height_target = height_target;
    packet.lat_plan = lat_plan;
    packet.lon_plan = lon_plan;
    packet.height_plan = height_plan;
    packet.remain_time_total = remain_time_total;
    packet.remain_time_next_waypoint = remain_time_next_waypoint;
    packet.mean_speed_next_waypoint = mean_speed_next_waypoint;
    packet.strike_target_x = strike_target_x;
    packet.strike_target_y = strike_target_y;
    packet.PodVarX = PodVarX;
    packet.PodVarY = PodVarY;
    packet.PodVarZ = PodVarZ;
    packet.target_system = target_system;
    packet.target_component = target_component;
    packet.nav_status = nav_status;
    packet.task_phase_flag = task_phase_flag;
    packet.strike_call_flag = strike_call_flag;
    packet.response_call_flag = response_call_flag;
    packet.replan_flag = replan_flag;
    packet.PodCtrlInfo = PodCtrlInfo;
    packet.PodZoomVel = PodZoomVel;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
}

/**
 * @brief Encode a agx_to_px4_dedicate_info struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param agx_to_px4_dedicate_info C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_agx_to_px4_dedicate_info_t* agx_to_px4_dedicate_info)
{
    return mavlink_msg_agx_to_px4_dedicate_info_pack(system_id, component_id, msg, agx_to_px4_dedicate_info->time_boot_ms, agx_to_px4_dedicate_info->target_system, agx_to_px4_dedicate_info->target_component, agx_to_px4_dedicate_info->nav_status, agx_to_px4_dedicate_info->roll, agx_to_px4_dedicate_info->pitch, agx_to_px4_dedicate_info->yaw, agx_to_px4_dedicate_info->lat_target, agx_to_px4_dedicate_info->lon_target, agx_to_px4_dedicate_info->height_target, agx_to_px4_dedicate_info->task_phase_flag, agx_to_px4_dedicate_info->strike_call_flag, agx_to_px4_dedicate_info->response_call_flag, agx_to_px4_dedicate_info->replan_flag, agx_to_px4_dedicate_info->lat_plan, agx_to_px4_dedicate_info->lon_plan, agx_to_px4_dedicate_info->height_plan, agx_to_px4_dedicate_info->remain_time_total, agx_to_px4_dedicate_info->remain_time_next_waypoint, agx_to_px4_dedicate_info->mean_speed_next_waypoint, agx_to_px4_dedicate_info->strike_target_x, agx_to_px4_dedicate_info->strike_target_y, agx_to_px4_dedicate_info->PodCtrlInfo, agx_to_px4_dedicate_info->PodVarX, agx_to_px4_dedicate_info->PodVarY, agx_to_px4_dedicate_info->PodVarZ, agx_to_px4_dedicate_info->PodZoomVel);
}

/**
 * @brief Encode a agx_to_px4_dedicate_info struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param agx_to_px4_dedicate_info C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_agx_to_px4_dedicate_info_t* agx_to_px4_dedicate_info)
{
    return mavlink_msg_agx_to_px4_dedicate_info_pack_chan(system_id, component_id, chan, msg, agx_to_px4_dedicate_info->time_boot_ms, agx_to_px4_dedicate_info->target_system, agx_to_px4_dedicate_info->target_component, agx_to_px4_dedicate_info->nav_status, agx_to_px4_dedicate_info->roll, agx_to_px4_dedicate_info->pitch, agx_to_px4_dedicate_info->yaw, agx_to_px4_dedicate_info->lat_target, agx_to_px4_dedicate_info->lon_target, agx_to_px4_dedicate_info->height_target, agx_to_px4_dedicate_info->task_phase_flag, agx_to_px4_dedicate_info->strike_call_flag, agx_to_px4_dedicate_info->response_call_flag, agx_to_px4_dedicate_info->replan_flag, agx_to_px4_dedicate_info->lat_plan, agx_to_px4_dedicate_info->lon_plan, agx_to_px4_dedicate_info->height_plan, agx_to_px4_dedicate_info->remain_time_total, agx_to_px4_dedicate_info->remain_time_next_waypoint, agx_to_px4_dedicate_info->mean_speed_next_waypoint, agx_to_px4_dedicate_info->strike_target_x, agx_to_px4_dedicate_info->strike_target_y, agx_to_px4_dedicate_info->PodCtrlInfo, agx_to_px4_dedicate_info->PodVarX, agx_to_px4_dedicate_info->PodVarY, agx_to_px4_dedicate_info->PodVarZ, agx_to_px4_dedicate_info->PodZoomVel);
}

/**
 * @brief Encode a agx_to_px4_dedicate_info struct with provided status structure
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 * @param agx_to_px4_dedicate_info C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_agx_to_px4_dedicate_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_agx_to_px4_dedicate_info_t* agx_to_px4_dedicate_info)
{
    return mavlink_msg_agx_to_px4_dedicate_info_pack_status(system_id, component_id, _status, msg,  agx_to_px4_dedicate_info->time_boot_ms, agx_to_px4_dedicate_info->target_system, agx_to_px4_dedicate_info->target_component, agx_to_px4_dedicate_info->nav_status, agx_to_px4_dedicate_info->roll, agx_to_px4_dedicate_info->pitch, agx_to_px4_dedicate_info->yaw, agx_to_px4_dedicate_info->lat_target, agx_to_px4_dedicate_info->lon_target, agx_to_px4_dedicate_info->height_target, agx_to_px4_dedicate_info->task_phase_flag, agx_to_px4_dedicate_info->strike_call_flag, agx_to_px4_dedicate_info->response_call_flag, agx_to_px4_dedicate_info->replan_flag, agx_to_px4_dedicate_info->lat_plan, agx_to_px4_dedicate_info->lon_plan, agx_to_px4_dedicate_info->height_plan, agx_to_px4_dedicate_info->remain_time_total, agx_to_px4_dedicate_info->remain_time_next_waypoint, agx_to_px4_dedicate_info->mean_speed_next_waypoint, agx_to_px4_dedicate_info->strike_target_x, agx_to_px4_dedicate_info->strike_target_y, agx_to_px4_dedicate_info->PodCtrlInfo, agx_to_px4_dedicate_info->PodVarX, agx_to_px4_dedicate_info->PodVarY, agx_to_px4_dedicate_info->PodVarZ, agx_to_px4_dedicate_info->PodZoomVel);
}

/**
 * @brief Send a agx_to_px4_dedicate_info message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot)
 * @param target_system  System ID
 * @param target_component  Component ID
 * @param nav_status  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error
 * @param roll [degE4]  roll angle between the body coordinate system and the geographic coordinate system
 * @param pitch [degE4]  pitch 
 * @param yaw [degE4]  yaw 
 * @param lat_target [degE7] Latitude
 * @param lon_target [degE7] Longitude
 * @param height_target [E-2 m] Height.
 * @param task_phase_flag  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike
 * @param strike_call_flag  0x00: not call;  others: id of nodes which were called to tail after target
 * @param response_call_flag  0x00: not response;  others: id of nodes which respond to tail after target
 * @param replan_flag  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan 
 * @param lat_plan [degE7] Latitude of planned waypoint
 * @param lon_plan [degE7] Longitude of planned waypoint
 * @param height_plan [E-2 m] Height of planned waypoint.
 * @param remain_time_total [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.
 * @param remain_time_next_waypoint [E-2 s] countdown time for this ammunition to next waypoint.
 * @param mean_speed_next_waypoint [millimeter/s] average speed to arrive the next waypoint
 * @param strike_target_x [px] location of target needs to strike, in image coordinate, upper-left point is the origin point 
 * @param strike_target_y [px] location of target needs to strike, 
 * @param PodCtrlInfo  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarX  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarY  data from seeker, in software in ring simulation, meaningless 
 * @param PodVarZ  data from seeker, in software in ring simulation, meaningless 
 * @param PodZoomVel  data from seeker, in software in ring simulation, meaningless 
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_agx_to_px4_dedicate_info_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t nav_status, int32_t roll, int32_t pitch, uint32_t yaw, int32_t lat_target, int32_t lon_target, int32_t height_target, uint8_t task_phase_flag, uint8_t strike_call_flag, uint8_t response_call_flag, uint8_t replan_flag, int32_t lat_plan, int32_t lon_plan, int32_t height_plan, uint32_t remain_time_total, uint32_t remain_time_next_waypoint, int16_t mean_speed_next_waypoint, int16_t strike_target_x, int16_t strike_target_y, uint8_t PodCtrlInfo, int16_t PodVarX, int16_t PodVarY, int16_t PodVarZ, uint8_t PodZoomVel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, roll);
    _mav_put_int32_t(buf, 8, pitch);
    _mav_put_uint32_t(buf, 12, yaw);
    _mav_put_int32_t(buf, 16, lat_target);
    _mav_put_int32_t(buf, 20, lon_target);
    _mav_put_int32_t(buf, 24, height_target);
    _mav_put_int32_t(buf, 28, lat_plan);
    _mav_put_int32_t(buf, 32, lon_plan);
    _mav_put_int32_t(buf, 36, height_plan);
    _mav_put_uint32_t(buf, 40, remain_time_total);
    _mav_put_uint32_t(buf, 44, remain_time_next_waypoint);
    _mav_put_int16_t(buf, 48, mean_speed_next_waypoint);
    _mav_put_int16_t(buf, 50, strike_target_x);
    _mav_put_int16_t(buf, 52, strike_target_y);
    _mav_put_int16_t(buf, 54, PodVarX);
    _mav_put_int16_t(buf, 56, PodVarY);
    _mav_put_int16_t(buf, 58, PodVarZ);
    _mav_put_uint8_t(buf, 60, target_system);
    _mav_put_uint8_t(buf, 61, target_component);
    _mav_put_uint8_t(buf, 62, nav_status);
    _mav_put_uint8_t(buf, 63, task_phase_flag);
    _mav_put_uint8_t(buf, 64, strike_call_flag);
    _mav_put_uint8_t(buf, 65, response_call_flag);
    _mav_put_uint8_t(buf, 66, replan_flag);
    _mav_put_uint8_t(buf, 67, PodCtrlInfo);
    _mav_put_uint8_t(buf, 68, PodZoomVel);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO, buf, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#else
    mavlink_agx_to_px4_dedicate_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.lat_target = lat_target;
    packet.lon_target = lon_target;
    packet.height_target = height_target;
    packet.lat_plan = lat_plan;
    packet.lon_plan = lon_plan;
    packet.height_plan = height_plan;
    packet.remain_time_total = remain_time_total;
    packet.remain_time_next_waypoint = remain_time_next_waypoint;
    packet.mean_speed_next_waypoint = mean_speed_next_waypoint;
    packet.strike_target_x = strike_target_x;
    packet.strike_target_y = strike_target_y;
    packet.PodVarX = PodVarX;
    packet.PodVarY = PodVarY;
    packet.PodVarZ = PodVarZ;
    packet.target_system = target_system;
    packet.target_component = target_component;
    packet.nav_status = nav_status;
    packet.task_phase_flag = task_phase_flag;
    packet.strike_call_flag = strike_call_flag;
    packet.response_call_flag = response_call_flag;
    packet.replan_flag = replan_flag;
    packet.PodCtrlInfo = PodCtrlInfo;
    packet.PodZoomVel = PodZoomVel;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO, (const char *)&packet, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#endif
}

/**
 * @brief Send a agx_to_px4_dedicate_info message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_agx_to_px4_dedicate_info_send_struct(mavlink_channel_t chan, const mavlink_agx_to_px4_dedicate_info_t* agx_to_px4_dedicate_info)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_agx_to_px4_dedicate_info_send(chan, agx_to_px4_dedicate_info->time_boot_ms, agx_to_px4_dedicate_info->target_system, agx_to_px4_dedicate_info->target_component, agx_to_px4_dedicate_info->nav_status, agx_to_px4_dedicate_info->roll, agx_to_px4_dedicate_info->pitch, agx_to_px4_dedicate_info->yaw, agx_to_px4_dedicate_info->lat_target, agx_to_px4_dedicate_info->lon_target, agx_to_px4_dedicate_info->height_target, agx_to_px4_dedicate_info->task_phase_flag, agx_to_px4_dedicate_info->strike_call_flag, agx_to_px4_dedicate_info->response_call_flag, agx_to_px4_dedicate_info->replan_flag, agx_to_px4_dedicate_info->lat_plan, agx_to_px4_dedicate_info->lon_plan, agx_to_px4_dedicate_info->height_plan, agx_to_px4_dedicate_info->remain_time_total, agx_to_px4_dedicate_info->remain_time_next_waypoint, agx_to_px4_dedicate_info->mean_speed_next_waypoint, agx_to_px4_dedicate_info->strike_target_x, agx_to_px4_dedicate_info->strike_target_y, agx_to_px4_dedicate_info->PodCtrlInfo, agx_to_px4_dedicate_info->PodVarX, agx_to_px4_dedicate_info->PodVarY, agx_to_px4_dedicate_info->PodVarZ, agx_to_px4_dedicate_info->PodZoomVel);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO, (const char *)agx_to_px4_dedicate_info, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#endif
}

#if MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_agx_to_px4_dedicate_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t nav_status, int32_t roll, int32_t pitch, uint32_t yaw, int32_t lat_target, int32_t lon_target, int32_t height_target, uint8_t task_phase_flag, uint8_t strike_call_flag, uint8_t response_call_flag, uint8_t replan_flag, int32_t lat_plan, int32_t lon_plan, int32_t height_plan, uint32_t remain_time_total, uint32_t remain_time_next_waypoint, int16_t mean_speed_next_waypoint, int16_t strike_target_x, int16_t strike_target_y, uint8_t PodCtrlInfo, int16_t PodVarX, int16_t PodVarY, int16_t PodVarZ, uint8_t PodZoomVel)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, roll);
    _mav_put_int32_t(buf, 8, pitch);
    _mav_put_uint32_t(buf, 12, yaw);
    _mav_put_int32_t(buf, 16, lat_target);
    _mav_put_int32_t(buf, 20, lon_target);
    _mav_put_int32_t(buf, 24, height_target);
    _mav_put_int32_t(buf, 28, lat_plan);
    _mav_put_int32_t(buf, 32, lon_plan);
    _mav_put_int32_t(buf, 36, height_plan);
    _mav_put_uint32_t(buf, 40, remain_time_total);
    _mav_put_uint32_t(buf, 44, remain_time_next_waypoint);
    _mav_put_int16_t(buf, 48, mean_speed_next_waypoint);
    _mav_put_int16_t(buf, 50, strike_target_x);
    _mav_put_int16_t(buf, 52, strike_target_y);
    _mav_put_int16_t(buf, 54, PodVarX);
    _mav_put_int16_t(buf, 56, PodVarY);
    _mav_put_int16_t(buf, 58, PodVarZ);
    _mav_put_uint8_t(buf, 60, target_system);
    _mav_put_uint8_t(buf, 61, target_component);
    _mav_put_uint8_t(buf, 62, nav_status);
    _mav_put_uint8_t(buf, 63, task_phase_flag);
    _mav_put_uint8_t(buf, 64, strike_call_flag);
    _mav_put_uint8_t(buf, 65, response_call_flag);
    _mav_put_uint8_t(buf, 66, replan_flag);
    _mav_put_uint8_t(buf, 67, PodCtrlInfo);
    _mav_put_uint8_t(buf, 68, PodZoomVel);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO, buf, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#else
    mavlink_agx_to_px4_dedicate_info_t *packet = (mavlink_agx_to_px4_dedicate_info_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->roll = roll;
    packet->pitch = pitch;
    packet->yaw = yaw;
    packet->lat_target = lat_target;
    packet->lon_target = lon_target;
    packet->height_target = height_target;
    packet->lat_plan = lat_plan;
    packet->lon_plan = lon_plan;
    packet->height_plan = height_plan;
    packet->remain_time_total = remain_time_total;
    packet->remain_time_next_waypoint = remain_time_next_waypoint;
    packet->mean_speed_next_waypoint = mean_speed_next_waypoint;
    packet->strike_target_x = strike_target_x;
    packet->strike_target_y = strike_target_y;
    packet->PodVarX = PodVarX;
    packet->PodVarY = PodVarY;
    packet->PodVarZ = PodVarZ;
    packet->target_system = target_system;
    packet->target_component = target_component;
    packet->nav_status = nav_status;
    packet->task_phase_flag = task_phase_flag;
    packet->strike_call_flag = strike_call_flag;
    packet->response_call_flag = response_call_flag;
    packet->replan_flag = replan_flag;
    packet->PodCtrlInfo = PodCtrlInfo;
    packet->PodZoomVel = PodZoomVel;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO, (const char *)packet, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_MIN_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_CRC);
#endif
}
#endif

#endif

// MESSAGE AGX_TO_PX4_DEDICATE_INFO UNPACKING


/**
 * @brief Get field time_boot_ms from agx_to_px4_dedicate_info message
 *
 * @return [ms] Timestamp (time since system boot)
 */
static inline uint32_t mavlink_msg_agx_to_px4_dedicate_info_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field target_system from agx_to_px4_dedicate_info message
 *
 * @return  System ID
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_target_system(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  60);
}

/**
 * @brief Get field target_component from agx_to_px4_dedicate_info message
 *
 * @return  Component ID
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_target_component(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  61);
}

/**
 * @brief Get field nav_status from agx_to_px4_dedicate_info message
 *
 * @return  navigation status, 0x11 :visual and inertial; 0x22 inertial ; 0x33 error
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_nav_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  62);
}

/**
 * @brief Get field roll from agx_to_px4_dedicate_info message
 *
 * @return [degE4]  roll angle between the body coordinate system and the geographic coordinate system
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_roll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  4);
}

/**
 * @brief Get field pitch from agx_to_px4_dedicate_info message
 *
 * @return [degE4]  pitch 
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_pitch(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  8);
}

/**
 * @brief Get field yaw from agx_to_px4_dedicate_info message
 *
 * @return [degE4]  yaw 
 */
static inline uint32_t mavlink_msg_agx_to_px4_dedicate_info_get_yaw(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  12);
}

/**
 * @brief Get field lat_target from agx_to_px4_dedicate_info message
 *
 * @return [degE7] Latitude
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_lat_target(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  16);
}

/**
 * @brief Get field lon_target from agx_to_px4_dedicate_info message
 *
 * @return [degE7] Longitude
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_lon_target(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  20);
}

/**
 * @brief Get field height_target from agx_to_px4_dedicate_info message
 *
 * @return [E-2 m] Height.
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_height_target(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  24);
}

/**
 * @brief Get field task_phase_flag from agx_to_px4_dedicate_info message
 *
 * @return  0x11: preparation; 0x22: detect; 0x33: tail_after; 0x44:strike
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_task_phase_flag(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  63);
}

/**
 * @brief Get field strike_call_flag from agx_to_px4_dedicate_info message
 *
 * @return  0x00: not call;  others: id of nodes which were called to tail after target
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_strike_call_flag(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  64);
}

/**
 * @brief Get field response_call_flag from agx_to_px4_dedicate_info message
 *
 * @return  0x00: not response;  others: id of nodes which respond to tail after target
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_response_call_flag(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  65);
}

/**
 * @brief Get field replan_flag from agx_to_px4_dedicate_info message
 *
 * @return  0x11: no need for replanning;  0x22: node(s) not arrive in time, replan 
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_replan_flag(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  66);
}

/**
 * @brief Get field lat_plan from agx_to_px4_dedicate_info message
 *
 * @return [degE7] Latitude of planned waypoint
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_lat_plan(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  28);
}

/**
 * @brief Get field lon_plan from agx_to_px4_dedicate_info message
 *
 * @return [degE7] Longitude of planned waypoint
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_lon_plan(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  32);
}

/**
 * @brief Get field height_plan from agx_to_px4_dedicate_info message
 *
 * @return [E-2 m] Height of planned waypoint.
 */
static inline int32_t mavlink_msg_agx_to_px4_dedicate_info_get_height_plan(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  36);
}

/**
 * @brief Get field remain_time_total from agx_to_px4_dedicate_info message
 *
 * @return [E-2 s] multi_ammunition arrive at same time enter terminal guidance countdown.
 */
static inline uint32_t mavlink_msg_agx_to_px4_dedicate_info_get_remain_time_total(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  40);
}

/**
 * @brief Get field remain_time_next_waypoint from agx_to_px4_dedicate_info message
 *
 * @return [E-2 s] countdown time for this ammunition to next waypoint.
 */
static inline uint32_t mavlink_msg_agx_to_px4_dedicate_info_get_remain_time_next_waypoint(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  44);
}

/**
 * @brief Get field mean_speed_next_waypoint from agx_to_px4_dedicate_info message
 *
 * @return [millimeter/s] average speed to arrive the next waypoint
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_mean_speed_next_waypoint(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  48);
}

/**
 * @brief Get field strike_target_x from agx_to_px4_dedicate_info message
 *
 * @return [px] location of target needs to strike, in image coordinate, upper-left point is the origin point 
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_strike_target_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  50);
}

/**
 * @brief Get field strike_target_y from agx_to_px4_dedicate_info message
 *
 * @return [px] location of target needs to strike, 
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_strike_target_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  52);
}

/**
 * @brief Get field PodCtrlInfo from agx_to_px4_dedicate_info message
 *
 * @return  data from seeker, in software in ring simulation, meaningless 
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_PodCtrlInfo(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  67);
}

/**
 * @brief Get field PodVarX from agx_to_px4_dedicate_info message
 *
 * @return  data from seeker, in software in ring simulation, meaningless 
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_PodVarX(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  54);
}

/**
 * @brief Get field PodVarY from agx_to_px4_dedicate_info message
 *
 * @return  data from seeker, in software in ring simulation, meaningless 
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_PodVarY(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  56);
}

/**
 * @brief Get field PodVarZ from agx_to_px4_dedicate_info message
 *
 * @return  data from seeker, in software in ring simulation, meaningless 
 */
static inline int16_t mavlink_msg_agx_to_px4_dedicate_info_get_PodVarZ(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int16_t(msg,  58);
}

/**
 * @brief Get field PodZoomVel from agx_to_px4_dedicate_info message
 *
 * @return  data from seeker, in software in ring simulation, meaningless 
 */
static inline uint8_t mavlink_msg_agx_to_px4_dedicate_info_get_PodZoomVel(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  68);
}

/**
 * @brief Decode a agx_to_px4_dedicate_info message into a struct
 *
 * @param msg The message to decode
 * @param agx_to_px4_dedicate_info C-struct to decode the message contents into
 */
static inline void mavlink_msg_agx_to_px4_dedicate_info_decode(const mavlink_message_t* msg, mavlink_agx_to_px4_dedicate_info_t* agx_to_px4_dedicate_info)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    agx_to_px4_dedicate_info->time_boot_ms = mavlink_msg_agx_to_px4_dedicate_info_get_time_boot_ms(msg);
    agx_to_px4_dedicate_info->roll = mavlink_msg_agx_to_px4_dedicate_info_get_roll(msg);
    agx_to_px4_dedicate_info->pitch = mavlink_msg_agx_to_px4_dedicate_info_get_pitch(msg);
    agx_to_px4_dedicate_info->yaw = mavlink_msg_agx_to_px4_dedicate_info_get_yaw(msg);
    agx_to_px4_dedicate_info->lat_target = mavlink_msg_agx_to_px4_dedicate_info_get_lat_target(msg);
    agx_to_px4_dedicate_info->lon_target = mavlink_msg_agx_to_px4_dedicate_info_get_lon_target(msg);
    agx_to_px4_dedicate_info->height_target = mavlink_msg_agx_to_px4_dedicate_info_get_height_target(msg);
    agx_to_px4_dedicate_info->lat_plan = mavlink_msg_agx_to_px4_dedicate_info_get_lat_plan(msg);
    agx_to_px4_dedicate_info->lon_plan = mavlink_msg_agx_to_px4_dedicate_info_get_lon_plan(msg);
    agx_to_px4_dedicate_info->height_plan = mavlink_msg_agx_to_px4_dedicate_info_get_height_plan(msg);
    agx_to_px4_dedicate_info->remain_time_total = mavlink_msg_agx_to_px4_dedicate_info_get_remain_time_total(msg);
    agx_to_px4_dedicate_info->remain_time_next_waypoint = mavlink_msg_agx_to_px4_dedicate_info_get_remain_time_next_waypoint(msg);
    agx_to_px4_dedicate_info->mean_speed_next_waypoint = mavlink_msg_agx_to_px4_dedicate_info_get_mean_speed_next_waypoint(msg);
    agx_to_px4_dedicate_info->strike_target_x = mavlink_msg_agx_to_px4_dedicate_info_get_strike_target_x(msg);
    agx_to_px4_dedicate_info->strike_target_y = mavlink_msg_agx_to_px4_dedicate_info_get_strike_target_y(msg);
    agx_to_px4_dedicate_info->PodVarX = mavlink_msg_agx_to_px4_dedicate_info_get_PodVarX(msg);
    agx_to_px4_dedicate_info->PodVarY = mavlink_msg_agx_to_px4_dedicate_info_get_PodVarY(msg);
    agx_to_px4_dedicate_info->PodVarZ = mavlink_msg_agx_to_px4_dedicate_info_get_PodVarZ(msg);
    agx_to_px4_dedicate_info->target_system = mavlink_msg_agx_to_px4_dedicate_info_get_target_system(msg);
    agx_to_px4_dedicate_info->target_component = mavlink_msg_agx_to_px4_dedicate_info_get_target_component(msg);
    agx_to_px4_dedicate_info->nav_status = mavlink_msg_agx_to_px4_dedicate_info_get_nav_status(msg);
    agx_to_px4_dedicate_info->task_phase_flag = mavlink_msg_agx_to_px4_dedicate_info_get_task_phase_flag(msg);
    agx_to_px4_dedicate_info->strike_call_flag = mavlink_msg_agx_to_px4_dedicate_info_get_strike_call_flag(msg);
    agx_to_px4_dedicate_info->response_call_flag = mavlink_msg_agx_to_px4_dedicate_info_get_response_call_flag(msg);
    agx_to_px4_dedicate_info->replan_flag = mavlink_msg_agx_to_px4_dedicate_info_get_replan_flag(msg);
    agx_to_px4_dedicate_info->PodCtrlInfo = mavlink_msg_agx_to_px4_dedicate_info_get_PodCtrlInfo(msg);
    agx_to_px4_dedicate_info->PodZoomVel = mavlink_msg_agx_to_px4_dedicate_info_get_PodZoomVel(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN? msg->len : MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN;
        memset(agx_to_px4_dedicate_info, 0, MAVLINK_MSG_ID_AGX_TO_PX4_DEDICATE_INFO_LEN);
    memcpy(agx_to_px4_dedicate_info, _MAV_PAYLOAD(msg), len);
#endif
}
